package com.zy.utils;

import javax.servlet.http.HttpServletRequest;
import com.zy.pro.user.model.User;
public class SessionUserUtil {
	/**
	 * 构造私有化
	 */
	private SessionUserUtil(){}
	/**
	 * 判断session中是否有User对象
	 */
	public static boolean checkUserIsLogin(HttpServletRequest request)
	{
		boolean flag=false;
		User user=(User)request.getSession().getAttribute("user");
		if(user!=null&&user instanceof User)
			flag=true;
		return flag;
	}
	
}
